package com.baowenli.server;


import com.baowenli.mapper.HandleHouseMapper;
import com.baowenli.mapper.HouseInfoMapper;
import com.baowenli.pojo.Room;
import com.baowenli.pojo.User;
import com.baowenli.util.SqlSessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

public class HandleHouseService {
    SqlSessionFactory factory = SqlSessionFactoryUtils.getSqlSessionFactory();

    /**
     * 查询所有
     *
     * @return
     */
    public int insertHousePeopleInfo(int id,String name, String sex, String phone, String address,String idCards) {
        //2.获取sqlSession
        SqlSession sqlSession = factory.openSession();
        //3.获取BrandMapper
        HandleHouseMapper mapper = sqlSession.getMapper(HandleHouseMapper.class);
        //4.调用方法
        int status = mapper.InsertHomePeopleInfo(id,name, sex, phone, address,idCards);
        sqlSession.commit();
        sqlSession.close();
        return status;
    }


}
